/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Modulo4;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author Jose Leonardo
 */
public class asignarImplementoGuardiaForm extends org.apache.struts.action.ActionForm {
    
    private String name;

    private int number;

    private Long id_guardia;

    private String fechaG;

    private String sede;

    private String ci;

    private Long id_implemento;

    private String tipoImpl;

    private String subtipoImpl;

    public String getFechaG() {
        return fechaG;
    }

    public void setFechaG(String fechaG) {
        this.fechaG = fechaG;
    }

    public String getSede() {
        return sede;
    }

    public void setSede(String sede) {
        this.sede = sede;
    }

    public String getCi() {
        return ci;
    }

    public void setCi(String ci) {
        this.ci = ci;
    }

    public Long getId_guardia() {
        return id_guardia;
    }

    public void setId_guardia(Long id_guardia) {
        this.id_guardia = id_guardia;
    }

    public Long getId_implemento() {
        return id_implemento;
    }

    public void setId_implemento(Long id_implemento) {
        this.id_implemento = id_implemento;
    }

    public String getSubtipoImpl() {
        return subtipoImpl;
    }

    public void setSubtipoImpl(String subtipoImpl) {
        this.subtipoImpl = subtipoImpl;
    }

    public String getTipoImpl() {
        return tipoImpl;
    }

    public void setTipoImpl(String tipoImpl) {
        this.tipoImpl = tipoImpl;
    }

    

    /**
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * @param string
     */
    public void setName(String string) {
        name = string;
    }

    /**
     * @return
     */
    public int getNumber() {
        return number;
    }

    /**
     * @param i
     */
    public void setNumber(int i) {
        number = i;
    }

    /**
     *
     */
    public asignarImplementoGuardiaForm() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (getName() == null || getName().length() < 1) {
            errors.add("name", new ActionMessage("error.name.required"));
            // TODO: add 'error.name.required' key to your resources
        }
        return errors;
    }
}
